<?php

use App\Scan;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateScansTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(Scan::TABLE, function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->nullable()->comment('扫码参数');
            $table->string('open_id')->nullable()->comment('open_id');
            $table->tinyInteger('type')->default(0)->comment('0是关注，1是扫描');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists(Scan::TABLE);
    }
}
